<?php

namespace App\Providers;

use Illuminate\Database\Events\QueryExecuted;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{

    public function boot()
    {
//        DB::listen(function (QueryExecuted $sql) {
//            Log::info($sql->sql);
//        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        if ($this->app->environment() !== 'production') {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        $this->app->register(\Illuminate\Redis\RedisServiceProvider::class);
        $this->app->configure('database');

        $this->app->register(\SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class);
    }
}
